<?php

/**
 * Description of emailHeaderFooterSaveAction
 \* www.teuker.nl - mail@teuker.nl
 *
 * @author francisc
 */

class guestSettingsSaveAction extends sfAction {
	public function execute($request) {
		$reservation_min_time = $request->getParameter('reservation_min_time');
		$reservation_min_time_msg = $request->getParameter('reservation_min_time_msg');
		$reservation_min_time_grp = $request->getParameter('reservation_min_time_grp');
		$reservation_min_time_grp_msg = $request->getParameter('reservation_min_time_grp_msg');
			
		SqlEngineCore::get()->update(array(
				'table' => 'settings',
				'columns' => array(
						'reservation_min_time' =>$reservation_min_time ,
						'reservation_min_time_msg' => $reservation_min_time_msg,
						'reservation_grp_min_time' => $reservation_min_time_grp,
						'reservation_grp_min_time_msg' => $reservation_min_time_grp_msg),
				'where' => array(
						'restaurant_id' => $this->getUser()->getAttribute('current_restaurant_id'))));
			
		Util::loadI18NHelper();
		return $this->renderText(__('Guest settings saved'));
	}


}
